events = cell(0);

events{1}.start = datenum(2011, 8, 1);
events{1}.stop  = datenum(2011, 8, 1);
events{1}.ammount = -1*100.0;
events{1}.repeat.type = 'date';
events{1}.repeat.skipyear = 2;
events{1}.repeat.stopdate = datenum(2014, 8, 1);

events{2}.start = datenum(2011, 8, 1);
events{2}.stop  = datenum(2011, 8, 1);
events{2}.ammount = -1*100.0;
events{2}.repeat.type = 'weekly';
events{2}.repeat.weekdays = {'Mon','Fri'};
events{2}.repeat.skipweek = 2;
events{2}.repeat.stopdate = datenum(2014, 8, 1);

events{3}.start = datenum(2011, 8, 1);
events{3}.stop  = datenum(2011, 8, 3);
events{3}.ammount = -1*100.0;
events{3}.repeat.type = 'monthly';
events{3}.repeat.skipmonth = 0;
events{3}.repeat.stopdate = datenum(2014, 8, 1);

startdate = datenum(2011, 6,16);
stopdate  = datenum(2015, 12, 31);

index = 3;

for i = startdate:stopdate
    res = isOnDate(events{index}, i);
    if res == 1
        fprintf('Found event on day %s\n', datestr(i));
    end
end

clear events startdate stopdate index i res;